package com.flot.yazb.model.user;

import com.flot.yazb.base.model.BModel;
import com.flot.yazb.base.client.RetrofitFactory;
import com.flot.yazb.aop.stub.RMCallback;
import com.flot.yazb.aop.stub.RMResponse;
import com.flot.yazb.retrofit.service.BService;

/**
 * Created by fengdongfei on 2017/9/18.
 */

public class OrderModel extends BModel {

    public static void geOrderList(String id, final Transit<OrderModel[]> incubator) {
        RetrofitFactory.getInstance()
                .create(BService.UserService.class)
                .getOrder(id)
                .enqueue(new RMCallback<RMResponse<OrderModel[]>>(incubator.getContext()) {
                    @Override
                    protected void onSuccess(RMResponse<OrderModel[]> result) {
                        incubator.onBorn(result.content, result.code(), result.message());
                    }

                    @Override
                    protected void onFail(String errorCode, String errorInfo) {
                        incubator.onBorn(null, errorCode, errorInfo);
                    }
                });
    }

    public String id;
    public String pay_id;
    public String money;
    public String price;
    public int type;
    public String pay_no;
    public String param;
    public String pay_time;
    public String pay_tag;
    public String status;
    public String creat_time;
    public String up_time;

}
